package com.tomryan.TLabel.dao;


import org.apache.ibatis.annotations.Mapper;
import com.tomryan.TLabel.model.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by TangRunQing on 2018/01/30.
 */
@Mapper
public interface UserMapper {
    @Select("select * from user where username = #{username} and password = #{password}")
    User validLogin(@Param("username") String username, @Param("password") String password);
    @Select("select count(1) from user where userid = #{userid}")
    Integer checkIdIsExist(@Param("userid") String userid);
    @Select("select * from user where userid = #{userid} limit 0,1")
    User getUserByUserId(@Param("userid") String userid);
}
